package pinpass;

public class PinPassHandlerProxy implements pinpass.PinPassHandler {
  private String _endpoint = null;
  private pinpass.PinPassHandler pinPassHandler = null;
  
  public PinPassHandlerProxy() {
    _initPinPassHandlerProxy();
  }
  
  public PinPassHandlerProxy(String endpoint) {
    _endpoint = endpoint;
    _initPinPassHandlerProxy();
  }
  
  private void _initPinPassHandlerProxy() {
    try {
      pinPassHandler = (new pinpass.PinPassHandlerServiceLocator()).getPinPassHandler();
      if (pinPassHandler != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)pinPassHandler)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)pinPassHandler)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (pinPassHandler != null)
      ((javax.xml.rpc.Stub)pinPassHandler)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public pinpass.PinPassHandler getPinPassHandler() {
    if (pinPassHandler == null)
      _initPinPassHandlerProxy();
    return pinPassHandler;
  }
  
  public int validator(java.lang.String coo) throws java.rmi.RemoteException{
    if (pinPassHandler == null)
      _initPinPassHandlerProxy();
    return pinPassHandler.validator(coo);
  }
  
  public java.lang.String getCoordenadas() throws java.rmi.RemoteException{
    if (pinPassHandler == null)
      _initPinPassHandlerProxy();
    return pinPassHandler.getCoordenadas();
  }
  
  
}